package org.hackystat.devcathlon.ui.page.profile.browse;

import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.hackystat.devcathlon.ui.page.DevcathlonBasePage;

/**
 * Implements the Manage Profile page, which enables a user to edit and update personal details.
 * @author Anthony Du, Scheller Sanchez
 *
 */
public class ProfileBrowsePage extends DevcathlonBasePage {
  /** Support serialization. */
  private static final long serialVersionUID = 1L;
  
  /**
   * Creates the Profile page.  
   * This page contains a form to edit selected information of a user. 
   */
  public ProfileBrowsePage() {
    // Set the body class attribute to section-1 so that the menubar is correct.
    add(new WebMarkupContainer("body") { 
      private static final long serialVersionUID = 1L;
      @Override
      public boolean isTransparentResolver() { 
        return true; 
      } 
      @Override
      protected void onComponentTag(ComponentTag tag) { 
        tag.put("class","thrColElsHdr section-1"); 
      }
    }); 
    
    add(new ProfileBrowsePanel("profileBrowsePanel"));
    
    // Make the tab corresponding to this page bold.
    get("ProfileBrowseLink").add(new SimpleAttributeModifier("class", "selected"));
  }
}
